/**
 * Copyright 2024 XCMG Group
 */
package com.ibm.risk.irmp.base.auth.dao;


import com.ibm.risk.irmp.base.auth.entity.SystemBizBranchRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * SystemBizBranchRoleRepository
 *
 * @author ：yrc
 * @date ：2024/6/14 09:51
 */
public interface SystemBizBranchRoleRepository extends JpaRepository<SystemBizBranchRole, Long> {
    /**
     * 根据机构编码删除数据
     * @param branchCode 机构编码
     */
    @Modifying
    @Query("delete from SystemBizBranchRole s where s.branchCode = ?1")
    void deleteAllByBranchCode(String branchCode);
}
